package com.sig.utils;

import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.sig.signomadeConnected.ConnectedActivity;

import android.util.Log;

public class ParseJson {
	/**
	 * the list of name
	 */
	private List<String> name;
	
	/**
	 * the array will be contains all name
	 */
	private String[] strArray;
	
	/**
	 * the jsonobject
	 */
	private JSONObject jsonResponse;
	
	/**
	 * 
	 * @param strJson
	 */
	public ParseJson(String strJson) {
		super();

		try {
			
			jsonResponse = new JSONObject(strJson);
			JSONArray jsonMainNode = jsonResponse.optJSONArray("liste");
			int lengthJsonArr = jsonMainNode.length(); 
			
			Log.d("LENGTH_DATA", ""+lengthJsonArr);
			
		} catch (JSONException e) {			
			Log.e("CANT PARSE JSON", ""+e);
		}
	}

	/**
	 * @return the name
	 */
	public List<String> getName() {
		return name;
	}
	
	/**
	 * 
	 * @return the arrayString
	 */
	public String[] getNameArray() {
		return strArray;
	}
}
